package com.wsz.educms.controller;

import com.wsz.commonutils.R;
import com.wsz.educms.pojo.Banner;
import com.wsz.educms.service.BannerService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/educms/bannerfront")
@Api("前台Banner")
public class BannerFrontController {

    @Autowired
    private BannerService bannerService;

    @GetMapping("/getAllBanner")
    public R getAllBanner() {

       List<Banner> list = bannerService.selectAllBanner();

        return R.ok().data("list",list);
    }

}